package com.jlkf.service.util;

import java.util.Random;

public class RandomUtil {


	// 产生8位随机数(不包含4和7)
	public static int generateRandomNum() {
		Random random = new Random();

		int num = -1;

		while (true) {

			num = (int) (random.nextDouble() * (100000000 - 10000000) + 10000000);

			if (!(num + "").contains("4")) {
				if (!(num + "").contains("7")) {
					break;
				}
			}
		}
		System.out.println(num);
		
		return num;
	}
	

}
